import 'package:json_annotation/json_annotation.dart';

part 'change_password.g.dart';

@JsonSerializable()
class ChangePassword {
  final Input? input;

  const ChangePassword({
    this.input,
  });

  factory ChangePassword.fromJson(Map<String, dynamic> json) =>
      _$ChangePasswordFromJson(json);

  Map<String, dynamic> toJson() => _$ChangePasswordToJson(this);
}

@JsonSerializable()
class Input {
  @JsonKey(name: 'old_password')
  final String oldPassword;
  @JsonKey(name: 'new_password')
  final String newPassword;

  const Input({
    required this.oldPassword,
    required this.newPassword,
  });

  factory Input.fromJson(Map<String, dynamic> json) =>
      _$InputFromJson(json);

  Map<String, dynamic> toJson() => _$InputToJson(this);
}
